﻿#pragma warning disable 649    // disable compiler warnings about unassigned fields

namespace SoftSource.Timecard.Web.Data
{
    using System;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;


    // The MetadataTypeAttribute identifies MilestoneMetadata as the class
    // that carries additional metadata for the Milestone class.
    [MetadataTypeAttribute(typeof(Milestone.MilestoneMetadata))]
    public partial class Milestone
    {
        internal sealed class MilestoneMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private MilestoneMetadata()
            {
            }

            [Required]
            [Display(Name = "Milestone Description", Order = 1)]
            public string Description;

            [Display(Name = "Dollar Amount", Order = 2)]
            public Nullable<decimal> DollarAmount;

            [Display(Name = "Target Date", Order = 3)]
            public Nullable<DateTime> TargetDate;

            [DefaultValue(false)]
            [Display(Name = "Has Been Met", Order = 4)]
            public Nullable<bool> HasBeenMet;

            [Display(AutoGenerateField = false)]
            public int MilestoneID;

            [Display(AutoGenerateField = false)]
            public int ProjectID;
        }
    }
}

#pragma warning restore 649    // re-enable compiler warnings about unassigned fields
